apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: <%= environment %>
  annotations:
    kubernetes.io/ingress.class: alb
    alb.ingress.kubernetes.io/scheme: internet-facing
    alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS": 443}]'
    alb.ingress.kubernetes.io/ssl-policy: ELBSecurityPolicy-TLS-1-2-2017-01
    alb.ingress.kubernetes.io/target-type: ip
    alb.ingress.kubernetes.io/target-group-attributes: load_balancing.algorithm.type=least_outstanding_requests
    alb.ingress.kubernetes.io/tags: Env=<%= environment %>,Service=rubygems.org
    alb.ingress.kubernetes.io/healthcheck-path: /internal/ping
    alb.ingress.kubernetes.io/load-balancer-name: <%= environment %>-rubygems-org
spec:
  tls:
  - hosts:
    - <%= environment %>-origin.rubygems.org
  defaultBackend:
    service:
      name: web
      port:
        number: 80
